package com.nimt.hqgl_idea.controller;

import com.nimt.hqgl_idea.param.GoodsUseRecordParam;
import com.nimt.hqgl_idea.service.GoodsUseRecordService;
import com.nimt.hqgl_idea.util.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin/*跨域*/
@RestController/*controller组件*/
@RequestMapping("/goodsUseRecord")/*地址*/
public class GoodsUseRecordController {
    @Autowired
    GoodsUseRecordService goodsUseRecordService;

    @GetMapping("/query")
    public ResponseBody query(GoodsUseRecordParam goodsUseRecordParam){
        return goodsUseRecordService.query(goodsUseRecordParam);
    }

    @PostMapping("/del")
    public ResponseBody del(Integer id){
        return goodsUseRecordService.del(id);
    }
}
